package com.xc.h05.service.wyl.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.xc.h05.entity.Coursepurchase;
import com.xc.h05.mapper.CoursepurchaseMapper;
import com.xc.h05.service.wyl.CoursepurchaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CoursepurchaseServiceImpl implements CoursepurchaseService {
    @Autowired
    private CoursepurchaseMapper coursepurchaseMapper;
    @Override
    public int deleteByPrimaryKey(Long id) {
        return coursepurchaseMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Coursepurchase record) {
        return coursepurchaseMapper.insert(record);
    }

    @Override
    public int insertSelective(Coursepurchase record) {
        return coursepurchaseMapper.insertSelective(record);
    }

    @Override
    public Coursepurchase selectByPrimaryKey(Long id) {
        return coursepurchaseMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Coursepurchase record) {
        return coursepurchaseMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Coursepurchase record) {
        return coursepurchaseMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<Coursepurchase> findAll() {
        // 这里简单实现，实际可能需要在Mapper中添加SQL语句来查询所有数据
        // 假设Mapper中有一个selectAll方法来查询所有数据
        return coursepurchaseMapper.findAll();
    }



}
